Repository navigation
test: supervise the shared Integration.TestRepo in setup_all - #164
Conversation
Four modules started EctoLibSql.Integration.TestRepo with start_link in setup_all and never stopped it. The repo died only when its linked setup_all process exited, asynchronously, so the next module could find the name still registered and fail with :already_started, invalidating every test in it. start_supervised! stops the repo before the next module runs. Closes kata rsn2. Claude-Session: https://claude.ai/code/session_01LR8MxKNHZfhfopXM58LKwG
|
No actionable comments were generated in the recent review. WalkthroughFour test modules now start the shared ChangesTest repository setup
Estimated code review effort: 2 (Simple) | ~5 minutes Change: Other Merge Risk:
|
|
@CodeRabbit review |
Action performed
|
Fixes the flaky
{:error, {:already_started, pid}}seen in CI on #159, which invalidated all 19 tests inInExpressionComprehensiveTest.in_expression_comprehensive_test,returning_clause_test,ecto_sqlite3_returning_debug_testandecto_sqlite3_crud_compat_testall startedEctoLibSql.Integration.TestRepowithstart_linkinsetup_alland never stopped it. The repo only died when its linkedsetup_allprocess exited, asynchronously, so the next module could still find the name registered. They now usestart_supervised!, which ExUnit stops before the next module runs.Verified with a throwaway probe of 20 modules sharing the repo: with
start_linkthe repo was still registered at the start of 19 of them and one hitalready_started; withstart_supervised!none did. The four modules pass across 15 seeds, the full suite passes (871 tests), andon_exitcleanup still removes the database files.https://claude.ai/code/session_01LR8MxKNHZfhfopXM58LKwG
Summary by CodeRabbit